<ion-view view-title="联系人">

  <ion-content>
    <ion-list can-swipe="true" class="editable-list user-list">

      <ion-item class="item-avatar" ng-repeat="contact in imContacts" ui-sref="app.im.contact-detail({'_id': contact._id})">
        <ion-delete-button class="icon ion-minus-circled" ng-click="delete($index)"></ion-delete-button>
        <img ng-src="" ng-if="contact.profile.avatar">
        <i class="item-image icon ion-person" ng-class="{'positive': contact.profile.sex=='男','cute': contact.profile.sex=='女'}" ng-if="!contact.profile.avatar"></i>
        <i class="icon" ng-class="{'ion-male positive': contact.profile.sex=='男','ion-female cute': contact.profile.sex=='女'}"></i>
        <h2>
          {{contact.profile.name}}
        </h2>
        <p>
          <span ng-repeat="dept in contact.profile.departments">{{dept.name}}</span>
          <span class="item-note">{{contact.profile.roleName}}</span>
        </p>
        <ion-option-button class="button-balanced" ng-click="makeCall(contact)"><i class="icon ion-ios-telephone-outline padding-right"></i>拨号</ion-option-button>
        <ion-option-button class="button-positive" ng-click="notify(contact)">发消息</ion-option-button>
      </ion-item>
    </ion-list>
    <p class="padding-top text-center dark2">操作 : 左滑列表项可更改或删除 </p>
  </ion-content>
</ion-view>
